package ycl.common.exception;

import lombok.Getter;
import ycl.common.result.REnum;


/**
 * 自定义异常
 *
 * @author ycl
 * @date 2022/6/26 0026 22:50:14
 */
@Getter
public class CustomException extends RuntimeException {

	private static final long serialVersionUID = -549611288138443327L;

	private final REnum enums;

	public CustomException(REnum enums) {
		this(enums, enums.msg);
	}

	public CustomException(String msg) {
		this(REnum.USED_SERVER_ERROR, msg);
	}

	public CustomException(REnum enums, String msg) {
		super(msg);
		this.enums = enums;
	}
}
